package org.wanho.txy.ems.service;

import org.wanho.txy.ems.entity.User;
import org.wanho.txy.ems.exception.LoginErrorException;
import org.wanho.txy.ems.exception.UsernameExistsException;
import org.wanho.txy.ems.exception.UserModifyException;
import org.wanho.txy.ems.param.UserParam;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2023-05-10 15:28
 * Description：<描述>
 */
public interface UserService {

    public User login(String username, String password) throws LoginErrorException;

    void register(User user) throws UsernameExistsException;

    List<User> findByCondition(UserParam userParam, int pageNo, int pageSize);

    public int selectCount(UserParam userParam);

    void modifyStatus(int id, int status);

    void removeById(int id);

    User findById(int id);

    void modify(User user) throws UserModifyException;

    void add(User user) throws UsernameExistsException;
}
